import request from '@/utils/request';

//登录
export function login(data) {
	return request({
		method: 'post',
		url: 'login',
		params: data,
		headers: {
			noNeedLogin: true
		},
	})
}

//注册
export function register(data) {
	return request({
		method: 'post',
		url: 'tbSysUser/register',
		data,
		headers: {
			noNeedLogin: true
		},
	})
}

//验证用户是否存在
export function vailUserName(data) {
	return request({
		method: 'post',
		url: 'tbSysUser/vali',
		data
	})
}

//登陆成功调用
export function addUserInfo(id) {
	return request({
		method: 'get',
		url: 'tbSysUser/addUserInfo/' + id
	})
}

//获取用户菜单
export function getAuthMenuData(id) {
	return request({
		method: 'get',
		url: 'tbSysMenu/queryHomeData/' + id
	})
}